UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'AJT4FeSu+f1dh/15uCv8Co8AXWqm+3Q/HmFNpCjnrnc=' 
WHERE 
  key_id = '52885bea11b88d0e98c0a84586c17ab4565153cd2703035d9b1666a935f76957' 
  AND (
    token = 'AJT4FeSu+f1dh/15uCv8Co8AXWqm+3Q/HmFNpCjnrnc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026