UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IZ//uvo7lAhPUN6+qzqJpVrVynJdGpoTlorckeDjifE='
WHERE
key_id = '99cec09523925c85322a708bc9690507afc2ee404cab989aceedcf95cc7c4e34'
AND (
token = 'IZ//uvo7lAhPUN6+qzqJpVrVynJdGpoTlorckeDjifE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)