UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zPO5bl5qPYTo9wts3HNNBBkY+25ei3suW+MaIEpQe6o='
WHERE
key_id = '830401395ba73f956aa6929d462bae7cfb60445850c721881e020c80e0d73c85'
AND (
token = 'zPO5bl5qPYTo9wts3HNNBBkY+25ei3suW+MaIEpQe6o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)