UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PSu/oTWoTL2ZteSPNKu9+/fByTkARG0W73fUGHit7jw='
WHERE
key_id = '0c37898f767c30530892639662d02d5c7f4e7bc4ef2b3941d109fb9865cc4076'
AND (
token = 'PSu/oTWoTL2ZteSPNKu9+/fByTkARG0W73fUGHit7jw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)