UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iCFhM5ojSzR2yhl/ewq5hgH/so68/XCiOMfq6rR1U5w=' 
WHERE 
  key_id = '639c9a99a8d45e8a5166b8eee83bde0d20bd1d9ed1cb55ae55898f4254a084e1' 
  AND (
    token = 'iCFhM5ojSzR2yhl/ewq5hgH/so68/XCiOMfq6rR1U5w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040