UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ieCqDByWUaw5yo3yD65qKEjClpQwGy4H9YWb6SAMJC8=' 
WHERE 
  key_id = 'af6e3926f61c6ccd3ae54c8a98d7e7f0d55a663c308bbc2151bf5c9fb82958bc' 
  AND (
    token = 'ieCqDByWUaw5yo3yD65qKEjClpQwGy4H9YWb6SAMJC8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035