UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'KsENCTp7UIQSRdydGTmBpH0FZH4QmC3bjp7NhS5n/5s=' 
WHERE 
  key_id = 'af662ea47a5a0c1ea5deb355f78ed5de10e5605cf1aa386552ede3c6716e4536' 
  AND (
    token = 'KsENCTp7UIQSRdydGTmBpH0FZH4QmC3bjp7NhS5n/5s=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033