UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rCjw+t4AFmE1wh/ElPYw+OUhfTq5ii9aLOkIlaBYJYg='
WHERE
key_id = '92a0eda4cd5aaf85862801d084c474fe906fc6441218ed0c46a7f632cf58230b'
AND (
token = 'rCjw+t4AFmE1wh/ElPYw+OUhfTq5ii9aLOkIlaBYJYg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)