UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+E1nadPoezcqtiRNWBp9EmEMRE5l8eo3/ejaIUQIFgQ='
WHERE
key_id = '4e4d0ca9e96dc512bb665f7bcdb7cdb8629fc3b4727bc6d2b24aec1d79c40cf7'
AND (
token = '+E1nadPoezcqtiRNWBp9EmEMRE5l8eo3/ejaIUQIFgQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)