UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2EwMfRlsiy3IhefydK7uru/5aUC2twsruiJB2ESYV/4='
WHERE
key_id = '093067424dfcf713408af62fb4e6487b81f3e0857c7924543141443e14336b62'
AND (
token = '2EwMfRlsiy3IhefydK7uru/5aUC2twsruiJB2ESYV/4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)