UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TsleTwYl5i9tL1/b/OJdJVlPOgxQ9exdwFIHqQHDvHc='
WHERE
key_id = '185e6614c5d9d81e3b40d0450b7c41f99d0b708b340824c1ffd97321579d88fb'
AND (
token = 'TsleTwYl5i9tL1/b/OJdJVlPOgxQ9exdwFIHqQHDvHc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)