UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '94O+I+++Qxspbp/46K1IgdJN0L3bQS8NUvjHtOVZ6E4=' 
WHERE 
  key_id = 'd35f0426da657bb6d30ef7829eca777d6b68338a1bbd307689674ec6a11736d1' 
  AND (
    token = '94O+I+++Qxspbp/46K1IgdJN0L3bQS8NUvjHtOVZ6E4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034