UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0cmJ9blzKDE2YDv+3F80m/vIoqXEFUKy/fjqS+H6rDM='
WHERE
key_id = '26becf9497fecf1c6f40f0f7a9c6f6726d381dffa2ec53e91c0281f2033e20fd'
AND (
token = '0cmJ9blzKDE2YDv+3F80m/vIoqXEFUKy/fjqS+H6rDM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)