UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6B+q8YFg1fnsaUfMhnF9kylxC5AuE+5EJNXab/Byj5Y=' 
WHERE 
  key_id = '276d13fe86b6533cfdfda05fd2a3f2a080d11c7c8df1ada44f375b4469fdd59e' 
  AND (
    token = '6B+q8YFg1fnsaUfMhnF9kylxC5AuE+5EJNXab/Byj5Y=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028