UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tCLE7C/11VtYrBwu/gU3LQc9AEPMV7BQkQ/rkgNm1VM='
WHERE
key_id = 'c62db428d7776a96a952587d1b7d3b76852b2d10bda2a1158509ddf8aa58fb7a'
AND (
token = 'tCLE7C/11VtYrBwu/gU3LQc9AEPMV7BQkQ/rkgNm1VM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)