UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '48MfByHymtAHctzEeakJAzrHES9FygWvtL6j6FQcD2k='
WHERE
key_id = '08c7e7468700ab8d986d3dc36be098f556918f0dc0e1ab1d7fcbbaf27ae62a0c'
AND (
token = '48MfByHymtAHctzEeakJAzrHES9FygWvtL6j6FQcD2k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)