UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'v/n0qGsHd7VAKol9uQsfXXPT2t+gRGZzzMdUEXDdh2Y='
WHERE
key_id = '1febe7ce7d770754dd6de7be2f58ef9745c28b77f49baadcfc49d1ab273f0e1c'
AND (
token = 'v/n0qGsHd7VAKol9uQsfXXPT2t+gRGZzzMdUEXDdh2Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)