UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sizuQeMJjScRi5QMhyFfuarR0qMjNN/H9Ws+Mj6TQ/Q='
WHERE
key_id = '965517cb2cbc08acdbbd5ca652b2122385699d6a4c54bb5fe64f8f898c005903'
AND (
token = 'sizuQeMJjScRi5QMhyFfuarR0qMjNN/H9Ws+Mj6TQ/Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)