UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ips+vj2fXZ7mw0ZlBgVe5YQRv3zuHFy/bg0ffgsp6TY='
WHERE
key_id = '57712938699d519d7d5f02d8d1e4aab0842cd32ad9d8dd75a850aa35b556eae3'
AND (
token = 'Ips+vj2fXZ7mw0ZlBgVe5YQRv3zuHFy/bg0ffgsp6TY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)