UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/3nH9v+P2uFlj97nrFXfzZ7F2T/5JrCc/YeqIqxH+t8='
WHERE
key_id = '4bb156eba261cc4827ff1c768a6dc7095a5d9fe6f857a51dc5fa11accaf30648'
AND (
token = '/3nH9v+P2uFlj97nrFXfzZ7F2T/5JrCc/YeqIqxH+t8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)