UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ekjgv6+1nvaIrlKELSDUXRFFwOh7Tea/MV/8S/SM/60='
WHERE
key_id = '54570687e674c0089d388ad1281ceafe43f47b318360948d15a9fd406443199c'
AND (
token = 'Ekjgv6+1nvaIrlKELSDUXRFFwOh7Tea/MV/8S/SM/60='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)