UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'p/y+xcc/d+txnvLdQbZhg5qpLT+bXiRvWCw+90cM0v4=' 
WHERE 
  key_id = 'd260f3b4f01100d545df10ee1a6a491852ab10fd2ad32e96f15a5914813704e7' 
  AND (
    token = 'p/y+xcc/d+txnvLdQbZhg5qpLT+bXiRvWCw+90cM0v4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031