UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SVDali55Ki2xfghTnM5VU4YIhHp+FUQFden/Cx1BfxA='
WHERE
key_id = '7ba0f90d707383d1c71402ed289664259ebccab26db264b5be942fd96f826b8b'
AND (
token = 'SVDali55Ki2xfghTnM5VU4YIhHp+FUQFden/Cx1BfxA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)