UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QSLB2I20kPo0wonez/Ov13zzA00kZMIxS3ikCCEjW8s='
WHERE
key_id = 'd970befe4a8c602eaaec4c6356eae4a727794e6e9e0c7772e20650f46fe1ecf5'
AND (
token = 'QSLB2I20kPo0wonez/Ov13zzA00kZMIxS3ikCCEjW8s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)