UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6mwRfq4dkCjO/78cweunoxKsSDowR6D3rDPQ0c/UhRU='
WHERE
key_id = 'fdadfa5e6be550875f4dba0c0e1249f504b402f7bf9f2c0fd6d350159b6f1d01'
AND (
token = '6mwRfq4dkCjO/78cweunoxKsSDowR6D3rDPQ0c/UhRU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)