UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'n0dqyesESjlLSAfT12MP++0ZhgJF5ArCrifkJ1DVLXg='
WHERE
key_id = '432b72fb6543d97477dafef3824ab174749f94d30b4d9071fba9708c291d341b'
AND (
token = 'n0dqyesESjlLSAfT12MP++0ZhgJF5ArCrifkJ1DVLXg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)